package com.cloud.servicegreyrelease1.compoment.threadlocal;

import org.springframework.stereotype.Component;

@Component
@SuppressWarnings("all")
public class UserIdThreadLocal {

    private static final ThreadLocal threadlocal = new ThreadLocal();

    public static <T> void set(T userId){
        threadlocal.set(userId);
    }

    public static <T> T get(){
        return (T)threadlocal.get();
    }

    public static void remove(){
        threadlocal.remove();
    }
}
